* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(skyblue 60%, green 100%);
  height: 100%;
}


#house {
  position: relative;
  top: 100px;
  bottom: 0;
  width: 500px;
  height: 400px;
  background-color: skyblue;
  border: 1px solid black;
  margin: auto;
}

#roof {
  position: absolute;
  top: 0;
  width: 500px;
  height: 50px;
  border-bottom: 100px solid palevioletred;
  background-color: #fff;
}